package org.jeecg.modules.demo.memberwithdrawrecord.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.memberwithdrawrecord.entity.MemberWithdrawRecord;
import org.jeecg.modules.demo.memberwithdrawrecord.mapper.MemberWithdrawRecordMapper;
import org.jeecg.modules.demo.memberwithdrawrecord.service.IMemberWithdrawRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 股东提现管理
 * @Author: jeecg-boot
 * @Date: 2022-01-14
 * @Version: V1.0
 */
@Service
public class MemberWithdrawRecordServiceImpl extends ServiceImpl<MemberWithdrawRecordMapper, MemberWithdrawRecord> implements IMemberWithdrawRecordService {
    @Autowired
    private MemberWithdrawRecordMapper memberWithdrawRecordMapper;

    @Override
    public void updateStatus(String status, String id) {
        memberWithdrawRecordMapper.updateStatus(status, id);
    }

    //查询提现待审核数量
    public String getWithdrawalToReview(String storeId) {
        return memberWithdrawRecordMapper.getWithdrawalToReview(storeId);
    }

    //查询可提现金额
    public String getCanWithdrawalAmount(String storeId, String stockId) {
        return memberWithdrawRecordMapper.getCanWithdrawalAmount(storeId, stockId);
    }

    // 查询提现记录
    @Override
    public List<MemberWithdrawRecord> getWidthManagmentList(Integer pageNo, Integer pageSize, String storeId, String memberId) {
        return memberWithdrawRecordMapper.getWidthManagmentList(pageNo, pageSize, storeId, memberId);
    }
}
